<!-- single folder-->
<ul class="dropdown-menu hide-platform-pad right-click-pop-up" role="menu" ng-if="(multipleChooseFiles.length<2 && supportFile && !file.isDocument()) && !currentFolder.isReadonly() && !file.isReadOnlyFolder()">
    <li ng-if="!searchModeIsOn && file.allowableActions.canMoveObject">
        <a ng-class="{'style-disable':file.readOnly,'':!file.readOnly}" class="popup-left-border" ng-click="!file.readOnly && moveTo(file,$event)">
            <i class="icon icon-move-file"></i>
            <span>{{ 'move_to' | translate }}</span>
        </a>
    </li>
    <!--canApplyACL 这个权限 是 consume 和 其它三个权限区别 collaborate contribute 一样的 manage多一个 canMoveObject权限-->
    <li ng-if="!detailPanelIsShow">
        <a ng-click="showDetail()">
            <i class="icon icon-info"></i>
            <span>{{'view_detail' | translate }}</span>
        </a>
    </li>
    <li ng-if="file.allowableActions.canUpdateProperties">
        <a ng-class="{'style-disable':file.readOnly,'':!file.readOnly}" class="popup-left-border" ng-click="!file.readOnly && rename(file)">
            <i class="icon icon-edit" ></i>
            <span>{{ 'rename' | translate }}</span>
        </a>
    </li>
    <li ng-if="!file.isRoot() && !file.isDocument() && title =='Shared Document'">
        <a class="popup-left-border" ng-click="setPermission(file)">
            <i class="fa fa-cog"></i>
            <span>{{'manage_permission' | translate}}</span>
        </a>
    </li>
    <li ng-if="!file.isRoot() && !file.isDocument() && file.allowableActions.canDeleteObject">
        <a ng-class="{'style-disable':file.readOnly,'':!file.readOnly}" class="popup-left-border" ng-click="!file.readOnly && deleteFolder(file, $event,true,true)">
            <i class="icon icon-delete"></i>
            <span>{{'delete' | translate }}</span>
        </a>
    </li>
</ul>
<!-- single document -->
<ul class="dropdown-menu hide-platform-pad right-click-pop-up" role="menu" ng-if="(multipleChooseFiles.length<2 && supportFile && file.isDocument()) && !currentFolder.isReadonly()">
    <!--canApplyACL 这个权限 是 consume 和 其它三个权限区别 collaborate contribute 一样的 manage多一个 canMoveObject权限-->
    <!--<li class="" >-->
    <!--<a href="javascript:;">-->
    <!--<span class="cloud-reading-share" file="file" current-scope="this"></span>-->
    <!--</a>-->
    <!--</li>-->
    <li ng-if="file.allowableActions.canGetContentStream" hover-dropdown ng-class="{'style-disable':!file.canPreview(),'':file.canPreview()}">
        <a class="popup-left-border" ng-click="preview(file,$event)" hover-dropdown-toggle>
            <i class="icon icon-eye"></i>
            <span>{{'preview' | translate }}</span>
        </a>
    </li>
    <li style="position: relative;" ng-if="!isSharedWithMe" hover-dropdown>
        <span class="cloud-reading-share" file="file" hover-dropdown-toggle current-scope="this"></span>
        <a href="javascript:;" style="position: relative;z-index:0;">
            <i class="icon icon-external-link"></i>
            <span>{{'share_file' | translate }}</span>
        </a>
    </li>
    <li ng-if="phantomSubscriptionStatus && !isEnterpriseSite && file.contentStreamMimeType==='application/pdf'" hover-dropdown hover-menu-append-to-body>
        <a class="popup-left-border pos-rel" hover-dropdown-toggle>
            <i class="icon icon-convert"></i>
            <span>{{'convert' | translate }}</span>
            <span class="pos-abs r-0">
                <i class="fa fa-caret-right"></i>
            </span>
        </a>
        <ul class="dropdown-menu right-click-pop-up" role="menu" hover-dropdown-menu>
            <li role="menuitem"><a class="popup-left-border" ng-click="convertPdfTo('PDFTOWORD',file)">{{ 'pdf2word' | translate }}</a></li>
            <li role="menuitem"><a class="popup-left-border" ng-click="convertPdfTo('PDFTOEXCEL',file)">{{ 'pdf2excel' | translate }}</a></li>
            <li role="menuitem"><a class="popup-left-border" ng-click="convertPdfTo('PDFTOPPT',file)">{{ 'pdf2ppt' | translate }}</a></li>
            <li class="divider"></li>
            <li role="menuitem"><a class="popup-left-border" ng-click="convertPdfTo('PDFTOIMG',file)">{{ 'pdf2img' | translate }}</a></li>
            <li role="menuitem"><a class="popup-left-border" ng-click="convertPdfTo('PDFTOTXT',file)">{{ 'pdf2txt' | translate }}</a></li>
            <li role="menuitem"><a class="popup-left-border" ng-click="convertPdfTo('PDFTOHTML',file)">{{ 'pdf2html' | translate }}</a></li>
            <li role="menuitem"><a class="popup-left-border" ng-click="convertPdfTo('PDFTOCPDF',file)">{{ 'pdf2cPdf' | translate }}</a></li>
            <li class="divider"></li>
            <li role="menuitem"><a class="popup-left-border" ng-click="convertPdfTo('EXPORTALLIMG',file)">{{ 'export_all_image' | translate }}</a></li>
        </ul>
    </li>
    <li ng-if="phantomSubscriptionStatus && !isEnterpriseSite  && file.contentStreamMimeType==='application/pdf'" hover-dropdown>
        <a class="popup-left-border" ng-click="compress_PDF('OPTIMIZER',file)" hover-dropdown-toggle>
            <i class="icon icon-compress"></i>
            <span>{{'compress_PDF' | translate }}</span>
        </a>
        <!--<ul class="dropdown-menu" role="menu">-->
        <!--<li role="menuitem"><a class="popup-left-border" ng-click="compress_PDF('OPTIMIZER',file)">{{ 'compress_PDF' | translate }}</a></li>-->
        <!--</ul>-->
    </li>
    <li ng-if="phantomSubscriptionStatus && !isEnterpriseSite && file.contentStreamMimeType==='application/pdf'" hover-dropdown hover-menu-append-to-body>
        <a class="popup-left-border pos-rel" hover-dropdown-toggle>
            <i class="icon icon-organizer"></i>
            <span>{{'organize' | translate }}</span>
            <span class="pos-abs r-0">
                <i class="fa fa-caret-right"></i>
            </span>
        </a>
        <ul class="dropdown-menu right-click-pop-up" role="menu" hover-dropdown-menu>
            <li role="menuitem"><a class="popup-left-border" ng-click="organizePDF('MERGEPDF',file)">{{ 'merge_PDF' | translate }}</a></li>
            <li role="menuitem"><a class="popup-left-border" ng-click="organizePDF('SPLITPDF',file)">{{ 'split_PDF' | translate }}</a></li>
            <li role="menuitem"><a class="popup-left-border" ng-click="organizePDF('PAGEORGANIZER',file)">{{ 'organize_PDF' | translate }}</a></li>
            <li class="divider"></li>
            <li role="menuitem"><a class="popup-left-border" ng-click="organizePDF('WATERMARK',file)">{{ 'add_watermark' | translate }}</a></li>
            <li role="menuitem"><a class="popup-left-border" ng-click="organizePDF('PDFHEADERFOOTER',file)">{{ 'add_header_footer' | translate }}</a></li>
            <li role="menuitem"><a class="popup-left-border" ng-click="organizePDF('PDFFLATTEN',file)">{{ 'flatten_PDF' | translate }}</a></li>
        </ul>
    </li>
    <li ng-if="phantomSubscriptionStatus && !isEnterpriseSite && file.contentStreamMimeType==='application/pdf'" hover-dropdown hover-menu-append-to-body>
        <a class="popup-left-border pos-rel" hover-dropdown-toggle>
            <i class="icon icon-protect"></i>
            <span>{{'protect' | translate }}</span>
            <span class="pos-abs r-0">
                <i class="fa fa-caret-right"></i>
            </span>
        </a>
        <ul class="dropdown-menu right-click-pop-up" role="menu" hover-dropdown-menu>
            <li role="menuitem"><a class="popup-left-border" ng-click="protectPdf('PDFPROTECT',file)">{{ 'password_protect' | translate }}</a></li>
            <li role="menuitem"><a class="popup-left-border" ng-click="protectPdf('PDFREDACTOR',file)">{{ 'redact_PDF' | translate }}</a></li>
        </ul>
    </li>
    <li role="separator" class="divider"></li>
    <li ng-if="!searchModeIsOn && file.allowableActions.canMoveObject" hover-dropdown>
        <a class="popup-left-border" ng-click="moveTo(file,$event)" hover-dropdown-toggle>
            <i class="icon icon-move-file"></i>
            {{ 'move_to' | translate }}
        </a>
    </li>
    <li ng-show="file.isDocument() && repository == 'fxcld' && device=='foxitReader' && showSendEmail" hover-dropdown>
        <a ng-click="sendViaEmail(file)" hover-dropdown-toggle>
            <i class="fa fa-envelope-o"></i>
            <span>{{'send_via_email' | translate }}</span>
        </a>
    </li>

    <li ng-if="isSharedWithMe && file.allowableActions.canGetContentStream && (device != 'foxitReader' || isIEorEdge) && !isSafari && file.description.canDownload==1" hover-dropdown>
        <a class="popup-left-border" ng-click="download(file)" hover-dropdown-toggle>
            <i class="icon icon-down"></i>
            <span>{{'download' | translate }}</span>
        </a>
    </li>
    <li ng-if="!isSharedWithMe && file.allowableActions.canGetContentStream && (device != 'foxitReader' || isIEorEdge) && !isSafari" hover-dropdown>
        <a class="popup-left-border" ng-click="download(file)" hover-dropdown-toggle>
            <i class="icon icon-down"></i>
            <span>{{'download' | translate }}</span>
        </a>
    </li>
    <li role="separator" class="divider" ng-if="!detailPanelIsShow && file.description.canDownload"></li>
    <li ng-show="!detailPanelIsShow" hover-dropdown>
        <a ng-click="showDetail()" hover-dropdown-toggle>
            <i class="icon icon-info"></i>
            <span>{{'view_detail' | translate }}</span>
        </a>
    </li>
    <li ng-if="file.allowableActions.canUpdateProperties" hover-dropdown>
        <a class="popup-left-border" ng-click="rename(file)" hover-dropdown-toggle>
            <i class="icon icon-edit" ></i>
            <span>{{ 'rename' | translate }}</span>
        </a>
    </li>
    <li ng-if="file.allowableActions.canUpdateProperties" hover-dropdown>
        <a class="popup-left-border" ng-click="openModifyFilePicker(file)" hover-dropdown-toggle>
            <i class="icon icon-up" ></i>
            <span>{{ 'upload_new_version' | translate }}</span>
        </a>
    </li>
    <li role="separator" class="divider" ng-if="file.allowableActions.canDeleteObject"></li>
    <li ng-if="file.allowableActions.canDeleteObject" hover-dropdown>
        <a class="popup-left-border" ng-click="delete(file)" hover-dropdown-toggle>
            <i class="icon icon-delete"></i>
            <span>{{'delete' | translate }}</span>
        </a>
    </li>
    <li ng-show="fromFillAndSign" class="{{ fromFillAndSign }}">
        <a ng-click="fillAndSign(file)">
            <i class="fa fa-link"></i> fill and sign {{ fillAndSign }}
        </a>
    </li>
    <li ng-if="file.isAllowEdit() && repository!='fxcld'" ng-class="{'style-disable':!file.canEdit(),'':file.canEdit()}">
        <a class="popup-left-border" ng-click="edit(file)">
            <i class="fa fa-edit"></i>
            <span>{{'edit' | translate }}</span>
        </a>
    </li>
</ul>
<!-- single document -->
<ul class="dropdown-menu hide-platform-pad right-click-pop-up" role="menu" ng-if="(multipleChooseFiles.length<2 && supportFile && file.isDocument()) && currentFolder.isReadonly()">

    <li ng-if="file.allowableActions.canGetContentStream"  ng-class="{'style-disable':!file.canPreview(),'':file.canPreview()}">
        <a class="popup-left-border" ng-click="preview(file,$event)">
            <i class="icon icon-eye"></i>
            <span>{{'preview' | translate }}</span>
        </a>
    </li>

</ul>
<!-- multiplefiles-->
<ul class="dropdown-menu hide-platform-pad right-click-pop-up" role="menu" ng-if="(multipleChooseFiles.length>1) && !currentFolder.isReadonly() && (canMoveMultipleFiles || canDeleteMultipleFiles)">
    <li ng-if="!searchModeIsOn && canMoveMultipleFiles">
        <a class="popup-left-border" ng-mousedown="moveTo(multipleChooseFiles,$event)">
            <i class="icon icon-move-file"></i>
            <span>{{ 'move_to' | translate }}</span>
        </a>
    </li>
    <li ng-if="canDeleteMultipleFiles">
        <a class="popup-left-border" ng-mousedown="multipleDel($event)">
            <i class="icon icon-delete"></i>
            <span>{{'delete' | translate }}</span>
        </a>
    </li>
    <li ng-if="canDownloadMultipleFiles">
        <a class="popup-left-border" ng-mousedown="multipleDownload()">
            <i class="icon icon-down"></i>
            <span>{{'download' | translate }}</span>
        </a>
    </li>
    <li>
        <a class="popup-left-border" ng-if="phantomSubscriptionStatus && !isEnterpriseSite" ng-mousedown="mergePdf(multipleChooseFiles,$event)" ng-class="{'hide':canMerge(multipleChooseFiles)==false,'':canMerge(multipleChooseFiles),'style-disable':disableMerge}">
            <i class="icon icon-merge"></i>
            <span>{{'merge_pdf' | translate }}</span>
        </a>
    </li>
</ul>